<#if isRoot>
[{
	"name": "请选择推荐商",
	"open":true
	<#if list?size gt 0>,
	"isParent": true,
	"children": [
	<#list list as bean>
		{
		"root": "${(bean.id)!}",
		"name": "<#if bean.system>[系统管理员]<#else>[<#if bean.id == admin.id>当前</#if><#if bean.agencyOrProxy>机构<#else>代理商</#if>]</#if><#if bean.intermediaName??>${bean.intermediaName!}<#else>${bean.username!}</#if>",
		"isParent": <#if bean.id == admin.id && !bean.justAdmin>true<#else>false</#if>,
		"recommentAgent": "<#if bean.parent?? && bean.justAdmin >${(bean.parent.intermediaName)!}<#elseif bean.system>${bean.username!}<#else>${(bean.intermediaName)!}</#if>",
		"recommentAccount": "${bean.username}"
		<#if bean.id == admin.id && !bean.justAdmin>,"icon": "${base}/res/betou_template/images/<#if bean.justAdmin>file.png<#else>folder.png</#if>"</#if>
		}<#if bean_has_next>,</#if>
	</#list>
	]
	</#if>
}]
<#else>
	[
	<#list list as bean>
		{
		"root": "${bean.id}",
		"name": "[${(bean.searchSettingRole.name)!}]<#if !bean.justAdmin && !bean.agencyOrProxy && bean.id != admin.id>${(bean.intermediaName)!}<#else>${bean.username!}</#if>",
		"recommentAgent": "<#if bean.parent?? && bean.justAdmin >${(bean.parent.intermediaName)!}<#else>${(bean.intermediaName)!}</#if>",
		"recommentAccount": "${bean.username}",
		"icon": "${base}/res/betou_template/images/<#if bean.justAdmin || bean.id==admin.id >file.png<#else>folder.png</#if>"
		}<#if bean_has_next>,</#if>
	</#list>
	]
</#if>
